export let errors = {
    cannotGetApplicationId() {
        let msg = `Get not get application id from header or route data.`;
        let err = new Error(msg);
        err.name = errors.cannotGetApplicationId.name;
        return err;
    },
    routeDataFieldNull(fieldName: string): Error {
        let msg = `The ${fieldName} field of route data cannt be null.`;
        let error = new Error(msg);
        error.name = errors.routeDataFieldNull.name;
        return error;
    },
    wxSettingNull() {
        let msg = `Weixin setting is null.`;
        let error = new Error(msg);
        error.name = errors.wxSettingNull.name;
        return error;
    },
    objectFieldNull(fieldName: string, objectName: string): Error {
        let msg = `The ${fieldName} field of ${objectName} cannt be null.`;
        let error = new Error(msg);
        error.name = errors.objectFieldNull.name;
        return error;
    },
}